Add a vfunc for gdk_selection_send_notify_for_display
authorMatthias Clasen <mclasen@redhat.com>
Fri, 17 Dec 2010 00:58:07 +0000 (19:58 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 21 Dec 2010 17:07:03 +0000 (12:07 -0500)
gdk/gdkdisplayprivate.h
gdk/gdkselection.c
gdk/x11/gdkdisplay-x11.c
gdk/x11/gdkprivate-x11.h
gdk/x11/gdkselection-x11.c

index 4764909d00d3bee5b1d5c0d39db66cb680a5ebc0..74843f15b4e9a7619631194fc7003b902afc7019 100644 (file)
@@ -203,6 +203,12 @@ struct _GdkDisplayClass
                                                      GdkAtom       selection,
                                                      guint32       time,
                                                      gboolean      send_event);
+  void                       (*send_selection_notify) (GdkDisplay *dispay,
+                                                       GdkNativeWindow  requestor,
+                                                       GdkAtom          selection,
+                                                       GdkAtom          target,
+                                                       GdkAtom          property,
+                                                       guint32          time_);
 
   /* Signals */
   void (*closed) (GdkDisplay *display,
index 57b85840c43238022dbfdfeb2904a7288983d00f..188e64f07e9c7c19143836c12e279f33555a56f1 100644 (file)
@@ -306,3 +306,31 @@ gdk_selection_owner_get_for_display (GdkDisplay *display,
 
   return GDK_DISPLAY_GET_CLASS (display)->get_selection_owner (display, selection);
 }
+
+/**
+ * gdk_selection_send_notify_for_display:
+ * @display: the #GdkDisplay where @requestor is realized
+ * @requestor: window to which to deliver response
+ * @selection: selection that was requested
+ * @target: target that was selected
+ * @property: property in which the selection owner stored the data,
+ *            or %GDK_NONE to indicate that the request was rejected
+ * @time_: timestamp
+ *
+ * Send a response to SelectionRequest event.
+ *
+ * Since: 2.2
+ */
+void
+gdk_selection_send_notify_for_display (GdkDisplay       *display,
+                                       GdkNativeWindow  requestor,
+                                       GdkAtom          selection,
+                                       GdkAtom          target,
+                                       GdkAtom          property,
+                                       guint32          time_)
+{
+  g_return_if_fail (GDK_IS_DISPLAY (display));
+
+  GDK_DISPLAY_GET_CLASS (display)
+    ->send_selection_notify (display, requestor, selection,target, property, time_);
+}
index 4ad87a45755e20b01c882dba4b46cf1e35aa0ba4..4595c67f24a9e58578ccc1888679adaba83c2741 100644 (file)
@@ -2762,4 +2762,5 @@ _gdk_display_x11_class_init (GdkDisplayX11Class * class)
   display_class->pop_error_trap = pop_error_trap;
   display_class->get_selection_owner = _gdk_x11_display_get_selection_owner;
   display_class->set_selection_owner = _gdk_x11_display_set_selection_owner;
+  display_class->send_selection_notify = _gdk_x11_display_send_selection_notify;
 }
index 68ec939491ccdf38bee1273fea7f11c07a052f4f..866854ae45dbf6586386640e351de47839fb3420 100644 (file)
@@ -189,13 +189,19 @@ void _gdk_x11_display_update_grab_info_ungrab (GdkDisplay *display,
 void _gdk_x11_display_queue_events            (GdkDisplay *display);
 
 
-gboolean    _gdk_x11_display_set_selection_owner (GdkDisplay *display,
-                                                  GdkWindow  *owner,
-                                                  GdkAtom     selection,
-                                                  guint32     time,
-                                                  gboolean    send_event);
-GdkWindow * _gdk_x11_display_get_selection_owner (GdkDisplay *display,
-                                                  GdkAtom     selection);
+gboolean    _gdk_x11_display_set_selection_owner   (GdkDisplay *display,
+                                                    GdkWindow  *owner,
+                                                    GdkAtom     selection,
+                                                    guint32     time,
+                                                    gboolean    send_event);
+GdkWindow * _gdk_x11_display_get_selection_owner   (GdkDisplay *display,
+                                                    GdkAtom     selection);
+void        _gdk_x11_display_send_selection_notify (GdkDisplay       *display,
+                                                    GdkNativeWindow  requestor,
+                                                    GdkAtom          selection,
+                                                    GdkAtom          target,
+                                                    GdkAtom          property,
+                                                    guint32          time);
 
 void _gdk_x11_device_check_extension_events   (GdkDevice  *device);
 
index 0ba05199e6ded1b7eb504daf1d0389b0c5ec62e5..81963dcad3d8007db4a0ad28d2cd1b2522d8a585 100644 (file)
@@ -334,32 +334,16 @@ gdk_selection_property_get (GdkWindow  *requestor,
   return 0;
 }
 
-/**
- * gdk_selection_send_notify_for_display:
- * @display: the #GdkDisplay where @requestor is realized
- * @requestor: window to which to deliver response.
- * @selection: selection that was requested.
- * @target: target that was selected.
- * @property: property in which the selection owner stored the data,
- *            or %GDK_NONE to indicate that the request was rejected.
- * @time_: timestamp. 
- *
- * Send a response to SelectionRequest event.
- *
- * Since: 2.2
- **/
 void
-gdk_selection_send_notify_for_display (GdkDisplay       *display,
-                                      GdkNativeWindow  requestor,
-                                      GdkAtom          selection,
-                                      GdkAtom          target,
-                                      GdkAtom          property, 
-                                      guint32          time)
+_gdk_x11_display_send_selection_notify (GdkDisplay       *display,
+                                        GdkNativeWindow  requestor,
+                                        GdkAtom          selection,
+                                        GdkAtom          target,
+                                        GdkAtom          property,
+                                        guint32          time)
 {
   XSelectionEvent xevent;
-  
-  g_return_if_fail (GDK_IS_DISPLAY (display));
-  
+
   xevent.type = SelectionNotify;
   xevent.serial = 0;
   xevent.send_event = True;